<template>
  <a-layout-content style="margin: 0 16px">
    <a-button type="primary" @click="goback" style="margin-bottom: 20px"
      >返回</a-button
    >
   
      <div :style="{ padding: '24px', background: '#fff', minHeight: '30px' }">
        <p class="titleMess">基础信息</p>
        <a-divider />
        <a-form
          ref="formRef"
          :model="addTaskForm"
        >
          <a-form-item ref="taskSceneId" label="业务场景" name="taskSceneId" :required="true">
            <a-select
              v-model:value="addTaskForm.taskSceneId"
              placeholder="请选择任务场景"
              @change="selectScene"
              :options="sceneOptions"
            />
            </a-select>
          </a-form-item>
          <a-form-item ref="taskObject" label="任务级别" name="taskObject"  :required="true">
            <a-select
              v-model:value="addTaskForm.taskObject"
              :options="taskObjectData"
              @change="changeTaskObject"
              placeholder="请选择任务级别"
              :disabled="ban"
            />
            <span class="tishi"
              ><br />门店任务:发布到门店所有导购,任意1个导购完成,其他导购任务也完成;导购任务:发布到设置的导购,需每个导购均需自行完成;自动任务:无需导购执行,系统直接将任务作用于目标会员</span
            >
          </a-form-item>
          <a-form-item ref="taskTitle" label="任务名称" name="taskTitle" :required="true">
            <a-input
              placeholder="填写名称，最多40字"
              v-model:value="addTaskForm.taskTitle"
              autoComplete="off"
              :maxLength="40"
              
            />
            <span class="tishi">任务的通用公开名称,供导购端展示使用</span>
          </a-form-item>
          <a-form-item ref="taskAlias" label="任务别名" name="taskAlias" class="ml" v-if="boxTask">
            <a-input
              placeholder="填写名称，最多40字"
              v-model:value="addTaskForm.taskAlias"
              autoComplete="off"
              :maxLength="40"
            />
            <span class="tishi">别名供公司内部使用</span>
          </a-form-item>
          <a-form-item
            ref="taskDescription"
            label="任务说明"
            name="taskDescription"
            :required="true"
          >
            <a-textarea
              v-model:value="addTaskForm.taskDescription"
              placeholder="填写说明，最多400字"
              style="min-height: 180px"
              auto-size
              :maxLength="400"
            />
          </a-form-item>
           <a-form-item ref="execType" label="执行时效" name="execType" :required="true" v-if="addTaskForm.taskObject===3">
            <a-select
              v-model:value="addTaskForm.execType"
              @change="changeexecType"
              :options="execTypeData1"
              placeholder="请选择执行时效"
            >
            </a-select>
          </a-form-item>
          <a-form-item ref="execType" label="执行时效" name="execType" :required="true" v-else>
            <a-select
              v-model:value="addTaskForm.execType"
              @change="changeexecType"
              :options="execTypeData"
              placeholder="请选择执行时效"
            >
            </a-select>
          </a-form-item>
          <!-- 选择单次 -->
          <div v-if="onceVisible" :keys="1">
            <a-form-item ref="effectDate" label="开始时间" name="effectDate" :required="true">
              <a-date-picker
                show-time
                placeholder="请选择时间"
                v-model:value="addTaskForm.effectDate"
                :format="dateFormat"
                :value-format="dateFormat"
              />
            </a-form-item>
            <a-form-item ref="expireTime" label="有效期" name="expireTime" class="ml" :required="true">
              <a-input-number
                style="width: 200px"
                id="inputNumber"
                v-model:value="addTaskForm.expireTime"
                :min="1"
                :max="30"
                :controls="false"
                placeholder="填写数字，并选择单位"
              />
              <a-select
                v-model:value="addTaskForm.expireType"
                :options="expireTypeData"
                placeholder="请选择时间单位"
                style="margin-left: 10px"
                name="expireType"
              >
              </a-select>
              <span class="tishi">不填写时间单位默认为天</span>
            </a-form-item>
            <a-form-item label="发布时间" ref="publishDate" name="publishDate" class="ml">
              <a-date-picker
                show-time
                placeholder="请选择时间"
                v-model:value="addTaskForm.publishDate"
                :format="dateFormat"
                :value-format="dateFormat"
              />
              <span class="tishi"
                >导购/门店任务下发时间，不填写表示立即生效</span
              >
            </a-form-item>
          </div>
          <!-- 定时循环 -->
          <div v-else-if="circulationVisible" :keys="2">
            <a-form-item ref="cycleType" label="执行周期" name="cycleType" :required="true">
              <a-select
                v-model:value="addTaskForm.cycleType"
                @change="changecycleType"
                :options="cycleTypeData"
                placeholder="请选择时间单位"
              >
              </a-select>
            </a-form-item>
                <!-- <a-form-item ref="effectDate" label="开始时间" name="effectDate" :required="true">
              <a-date-picker
                show-time
                placeholder="请选择时间"
                v-model:value="addTaskForm.effectDate"
                :format="dateFormat"
                :value-format="dateFormat"
              />
            </a-form-item> -->
            <!-- 每周执行 -->
            <!-- @change="handleChange" -->
            <a-form-item
              ref="execWeek"
              label="每周执行"
              name="execWeek"
              v-if="weeksVisible"
              :required="true"
            >
              <a-select
                v-model:value="addTaskForm.execWeek"
                :options="execWeekData"
                placeholder="请选择时间单位"
              />
            </a-form-item>
            <!-- 每月执行 -->
            <!-- @change="handleChange" -->
            <a-form-item
              ref="execDay"
              label="每月执行"
              name="execDay"
              v-if="monthsVisible"
              :required="true"
            >
              <a-select
                v-model:value="addTaskForm.execDay"
                :options="monthDataForm"
                placeholder="请选择时间单位"
              />
            </a-form-item>
            <!-- @change="handleChange" -->
            <a-form-item ref="execTime" label="开始时间" name="execTime" :required="true">
              <span v-if="hoursVisible">整点执行，默认可执行时间为10:00-22:00</span>
            <a-date-picker
                show-time
                placeholder="请选择时间"
                v-model:value="addTaskForm.execTime"
                :format="dayFormat"
                :value-format="dayFormat"
              />
            </a-form-item>
            <a-form-item ref="expireTime" label="有效期" name="expireTime" class="ml" :required="true" v-if="!hoursVisible">
              <a-input-number
                style="width: 200px"
                id="inputNumber"
                v-model:value="addTaskForm.expireTime"
                :min="1"
                :max="10000"
                :controls="false"
                placeholder="填写数字，并选择单位"
              />
              <!-- @change="handleChange" -->
              <a-select
                v-model:value="addTaskForm.expireType"
                :options="expireTypeData"
                placeholder="请选择时间单位"
                style="margin-left: 10px"
              >
              </a-select>
              <span class="tishi">不填写时间单位默认为天</span>
            </a-form-item>
             <!-- <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.cycleType=== 4"
            :required="true"
          >
      
          <MessageDioloag @chooseData="chooseTemplateId" />
             
          </a-form-item> -->
            <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.cycleType=== 4"
            :required="true"
          >
            <a-select
              v-model:value="addTaskForm.taskType"
              :options="messageTaskTypeData"
              @change="changetaskType"
              placeholder="请选择任务类型"
            >
            </a-select>
          </a-form-item>
           <!-- 消息模板 -->
          <a-form-item
            label="任务路径:"
            name="messageId"
            v-if="messIdVisible&&addTaskForm.cycleType=== 4"
            :keys="3"
            :required="true"
          >
            <MessageDioloag @chooseData="chooseTemplateId" />
          </a-form-item>
          </div>

          <!-- 实时触发 -->
          <div v-show="strikeVisible" :keys="3">
            <a-form-item ref="expireTime" label="有效期" name="expireTime" :required="true">
              <a-input-number
                style="width: 80px"
                id="inputNumber"
                v-model:value="addTaskForm.expireTime"
                :min="1"
                :max="10000"
                :controls="false"
                @change="changeNumber"
              />
              <span style="margin-left:10px">小时</span>
            
            </a-form-item>
          </div>
          <a-form-item ref="endProcess" label="到期是否执行" name="endProcess" :required="true">
            <a-radio-group
              v-model:value="addTaskForm.endProcess"
              :options="endProcessDate"
              :disabled="noCarry"
               @change="changeendProcess"
            />
          </a-form-item>
          <a-form-item v-show="addTaskForm.endProcess == 1" label="到期可执行天数" :required="true">
            <!-- 添加校验。正整数数字框。 -->
            <a-input-number placeholder="请输入" v-model="addTaskForm.endProcessDay"  :min="1" :precision="0" />
            天
          </a-form-item>
          <!-- 门店任务或导购任务 -->
          <!-- 导购任务 -->
          <div>
            <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.taskObject === 1&&addTaskForm.execType !== 3&&addTaskForm.cycleType!== 4"
            :required="true"
          >
            <a-select
              v-model:value="addTaskForm.taskType"
              :options="taskTypeData"
              @change="changetaskType"
              placeholder="请选择任务类型"
            >
            </a-select>
             
          </a-form-item>
          <!-- 实时触发任务类型 -->
               <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.execType === 3&&addTaskForm.taskObject === 1"
            :required="true"
          >
            <a-select
              v-model:value="addTaskForm.taskType"
              :options="boxTaskTypeData"
              @change="changetaskType"
              placeholder="请选择任务类型"
            >
            </a-select>
          </a-form-item>
          </div>
          <!-- 门店任务 -->
          <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.taskObject === 2 &&addTaskForm.execType!==3 &&addTaskForm.cycleType!== 4"
            class="ml"
          >
            <a-select
              v-model:value="addTaskForm.taskType"
              :options="storeTaskTypeData"
              @change="changetaskType"
              placeholder="请选择任务类型"
            >
            </a-select>
          </a-form-item>
           <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.taskObject === 2 && addTaskForm.execType===3 &&addTaskForm.cycleType!== 4"
            class="ml"
          >
            <a-select
              v-model:value="addTaskForm.taskType"
              :options="storeBoxTask"
              @change="changetaskType"
              placeholder="请选择任务类型"
            >
            </a-select>
          </a-form-item>
          <!-- 自动任务 -->
          <a-form-item
            ref="taskType"
            label="任务类型"
            name="taskType"
            v-if="addTaskForm.taskObject === 3 &&addTaskForm.cycleType!== 4"
            :required="true"
          >
            <a-select
              v-model:value="addTaskForm.taskType"
              :options="autoTaskTypeData"
              @change="changetaskType"
              placeholder="请选择任务类型"
            >
            </a-select>
          </a-form-item>
          <a-form-item
            label="联系触达"
            name="custConnectType"
            v-if="callVisible"
            :keys="1"
            :required="true"
          >
            <!-- 联系触达 -->
            <a-checkbox-group
              v-model:value="addTaskForm.custConnectType"
              :options="custConnectTypeData"
              @change="onChange"
              :allowClear="true"
            />
             <!-- <a-select  
            v-if="phoneVisble"
            v-model:value="addTaskForm.phoneType"
              @change="changephoneType"
              :options="phoneType"
              placeholder="请选择电话类型"
              style="margin-left: 10px"></a-select> --> 
          </a-form-item>
          <!-- 微信转发 -->
          <a-form-item
            label="微信转发方式"
            name="wechatType"
            v-if="wechatVisible"
            :keys="2"
            :required="true"
          >
            <a-radio-group
              v-model:value="addTaskForm.wechatType"
              :options="wechatTypeData"
              @change="wechatTypeDataClick"
            />
            <!-- @change="handleChange" -->
            <a-select
              v-if="rangeVisible"
              v-model:value="addTaskForm.visibleType"
              @change="changeRange"
              :options="rangeData"
              placeholder="请选择可见范围"
              style="margin-left: 10px"
            />
          </a-form-item>
          <!-- 消息模板 -->
          <a-form-item
            label="任务路径:"
            name="messageId"
            v-if="messIdVisible&&addTaskForm.cycleType!== 4"
            :keys="3"
            :required="true"
          >
            <MessageDioloag @chooseData="chooseTemplateId" />
          </a-form-item>
          <!-- 优惠券发放 -->

          <a-form-item
            label="任务路径"
            name="ticketId"
            v-if="onSaleVisible"
            :keys="4"
            :required="true"
          >
            <DiscountDioloag @chooseData="chooseTicketList" />
          </a-form-item>
          <!-- 公众号推文 -->
          <a-form-item
            label="任务路径"
            name="articleId"
            v-if="officialAccountsVisible"
            :keys="5"
            :required="true"
          >
            <WeChatDioloag @chooseData="choosegraphicList" />
          </a-form-item>
           <!-- 营销短信推送 -->
          <!-- <a-form-item
            label="任务路径"
            name="marketingId"
            v-if="marketingVisible"
            :keys="6"
            :required="true"
          >
            <MarketingMsgDioloag @chooseData="choosegraphicList" />
          </a-form-item> -->
          <!-- AI电话拨号 -->
          <!-- <a-form-item
            label="任务路径"
            name="AiIphoneId"
            v-if="aiIphoneVisible"
            :keys="7"
            :required="true"
          >
            <AiIphoneDioloag @chooseData="choosegraphicList" />
          </a-form-item> -->
          <a-form-item
            v-if="ifAuto"
            ref="feedbackType"
            label="反馈方式"
            name="feedbackType"
             :required="true"
          >
            <!-- @change="handleChange" -->
            <a-select
              v-model:value="addTaskForm.feedbackType"
              @change="changeFeedBack"
              :options="feedbackTypeData"
              placeholder="请选择反馈方式"
            />
          </a-form-item>
          <a-form-item
            label="执行导购"
            name="guideType"
            v-if="addTaskForm.taskObject === 1 && addTaskForm.execType!==3&&addTaskForm.cycleType!== 4"
            class="ml"
            :require="true"
          >
            <a-select
              v-model:value="addTaskForm.guideType"
              @change="changeGuide"
              placeholder="请选择"
              :options="guideData"
              :disabled="isDisabled"
            />
          </a-form-item>

          <a-form-item
            label="执行导购"
            name="guideType"
            v-if="addTaskForm.taskObject === 2 &&addTaskForm.execType!==3 &&addTaskForm.cycleType!== 4"
             :required="true"
          >
            <a-select
              v-model:value="addTaskForm.guideType"
              @change="changeGuide"
              placeholder="请选择"
              :options="storeGuideData"
              :disabled="isDisabled"
            />
          </a-form-item>
            <a-form-item
            label="执行导购"
            name="guideType"
            v-if="addTaskForm.taskObject === 2 &&addTaskForm.execType===3 "
             :required="true"
          >
           <span v-if="addTaskForm.taskType===13">由业务系统传参——内淘单所属门店对应的所有导购</span>
          </a-form-item>
            <a-form-item
            label="执行导购"
            name="guideType"
           v-if="addTaskForm.execType===3 && addTaskForm.taskObject===1"
             :required="true"
          >
          <span v-if="addTaskForm.taskType===10">由业务系统传参——box自主要盒工单会员对应的专属导购</span>
           <span v-if="addTaskForm.taskType===11||addTaskForm.taskType===12">由业务系统传参——box服务单会员对应的专属导购</span>
          </a-form-item>
          <a-form-item
            label="指定导购"
            v-if="appointGuideVisible"
            :keys="1"
            name="dealerType"
             :required="true"
          >
            <a-select
              v-model:value="addTaskForm.dealerType"
              :options="matchingData"
              @change="scopeGuide"
              placeholder="请选择范围"
            />
              <!-- 下载模板-->
            <a-button 
            v-if="guideExcel"
        @click="downloadGuideTemplate"
        >下载模板</a-button>
            <UploadGuide @chooseData="chooseGuideExcel" v-if="guideExcel" ref="child" />
          </a-form-item>
          <!-- 指定门店对应导购 -->
          <div v-if="appointshopGuideVisible" :keys="2">
            <a-form-item label="指定门店" name="storeType"  :required="true">
              <a-select
                @change="scopeShop"
                v-model:value="addTaskForm.storeType"
                :options="matchingShopData"
                placeholder="请选择范围"
              />
                 <!-- 下载模板-->
            <a-button 
            v-if="shopExcel" 
        @click="downloadStoreTemplate"
        >下载模板</a-button>
              <!-- 批量导入门店Excel -->
              <UploadStore @chooseData="choosexcelData" v-if="shopExcel" />
            </a-form-item>
          </div>
          <!-- 指定会员对应导购 -->
          <div v-show="appointvipGuideVisible &&addTaskForm.cycleType!== 4&&addTaskForm.execType!==3" :keys="3">
            <a-form-item label="目标会员" ref="custPack" name="custPack"  :required="true">
              <a-select
                v-model:value="addTaskForm.custPack"
                :options="aimVip"
                @change="onChooseVip"
                placeholder="请选择目标会员类型"
              />
            </a-form-item>

            <a-form-item label="添加人群包" ref="custPacks" name="custPacks"  :required="true" v-if="addTaskForm.custPack===1||addTaskForm.custPack===2">
              <PersonDioloag
                @chooseData="chooseCustList"
                :peopleType="peopleType"
              />
            </a-form-item>
          </div>

          <UplpadEnclosure  @chooseData="getUploadData" v-if="addTaskForm.taskObject!==3"  ref="child"/>
        </a-form>
        <div>
          <a-button class="addBtn" @click="addBtn(0)" type="primary"
            >保存为草稿</a-button
          >
          <a-button
            class="addBtn"
            style="margin-left: 20px"
            @click="addBtn(1)"
            type="primary"
            >发布</a-button
          >
        </div>
      </div>
   
  </a-layout-content>
</template>

<script>
import axios from 'axios'
import { addTask, uploadTaskMedia } from '@/api/task/taskrelese'
import { getOpenScene } from '@/api/task/taskscene'
import { monthData, timeData } from '@/assets/taskdata'
import api from '@/utils/taskapi'
import DiscountDioloag from '@/components/task/taskDioloag/DiscountDioloag'
import MessageDioloag from '@/components/task/taskDioloag/MessageDioloag'
import WeChatDioloag from '@/components/task/taskDioloag/WeChatDioloag'
import PersonDioloag from '@/components/task/taskDioloag/PersonDioloag'
// import MarketingMsgDioloag from "@/components/task/taskDioloag/MarketingMsgDioloag";//营销短信
// import AiIphoneDioloag from "@/components/task/taskDioloag/AiIphoneDioloag";//ai拨号
import UploadGuide from '@/components/task/uploadGuide/index.vue' //解析导购excel
import UploadStore from '@/components/task/uploadStore/index.vue' //解析门店excel
import UplpadEnclosure from '@/components/task/uploadEnclosure/index.vue' //上传材料
export default {
  name: 'relesework',
  components: {
    DiscountDioloag,
    MessageDioloag,
    WeChatDioloag,
    PersonDioloag,
    UploadGuide,
    UploadStore,
    UplpadEnclosure
    //  MarketingMsgDioloag,
    // AiIphoneDioloag
  },

  data() {
    return {
      hoursVisible: false,
      phoneVisble: false,
      dateFormat: 'YYYY-MM-DD HH:mm:ss',
      dayFormat: 'HH:mm',
      uploadForm: [],
      spinning: false,
      timeDataForm: timeData,
      monthDataForm: monthData,
      addTaskForm: {},
      allData: [],
      sceneOptions: [],
      aimVip: [
        { label: '实时人群包', value: 1 },
        { label: '非实时人群包(雅通)', value: 2 }
      ],
      taskObjectData: [
        { label: '导购任务', value: 1 },
        { label: '门店任务', value: 2 },
        { label: '自动任务', value: 3 }
      ],
      execTypeData: [
        { label: '定时循环', value: 1 },
        { label: '单次', value: 2 },
        { label: '实时触发', value: 3 }
        // {label: '条件触点', value:3}
      ],
      execTypeData1: [
        { label: '定时循环', value: 1 },
        { label: '单次', value: 2 }
        // {label: '条件触点', value:3}
      ],
      cycleTypeData: [
        { label: '每天执行', value: 1 },
        { label: '每周执行', value: 2 },
        { label: '每月执行', value: 3 },
        { label: '每小时执行', value: 4 }
      ],
      execWeekData: [
        { label: '周一', value: 1 },
        { label: '周二', value: 2 },
        { label: '周三', value: 3 },
        { label: '周四', value: 4 },
        { label: '周五', value: 5 },
        { label: '周六', value: 6 },
        { label: '周日', value: 7 }
      ],
      expireTypeData: [
        { label: '小时', value: 0 },
        { label: '天', value: 1 }
      ],
      contactData: [
        { label: '触点一', value: 1 },
        { label: '触点二', value: 2 }
      ],
      endProcessDate: [
        { label: '是', value: 1 },
        { label: '否', value: 2 }
      ],
      taskTypeData: [
        { label: '联系触达', value: 1 },
        { label: '微信转发', value: 2 },
        { label: '自定义任务', value: 6 },
        { label: '添加会员微信', value: 7 }
      ],
      storeTaskTypeData: [{ label: '自定义任务', value: 6 }],
      autoTaskTypeData: [
        { label: '消息模板', value: 3 },
        { label: '优惠券发放', value: 4 },
        { label: '公众号推文', value: 5 }
        // { label: "营销短信推送", value: 8 },
        // { label: "AI电话拨号", value: 9},
      ],
      messageTaskTypeData: [{ label: '消息模板', value: 3 }],
      targetVipData: [{ label: '雅通人群包', value: 1 }],
      custConnectTypeData: [
        { label: '电话', value: 1 },
        { label: '短信', value: 2 },
        { label: '微信私聊', value: 3 }
      ],
      wechatTypeData: [
        { label: '企微批量发送', value: 1 },
        { label: '企微分享', value: 3 },
        { label: '企微朋友圈', value: 2 }
      ],
      rangeData: [
        { label: '全部好友', value: 1 },
        { label: '指定目标好友', value: 2 }
      ],
      guideData: [
        { label: '指定导购', value: 1 },
        { label: '指定门店对应导购', value: 2 },
        { label: '指定会员对应导购', value: 3 }
      ],
      storeGuideData: [
        { label: '指定导购', value: 1 },
        { label: '指定门店对应导购', value: 2 },
        { label: '指定会员对应导购', value: 3 }
      ],
      matchingData: [
        { label: '全部导购', value: 0 },
        { label: '指定导购', value: 1 }
      ],
      matchingShopData: [
        { label: '全部门店', value: 0 },
        { label: '指定门店', value: 1 }
      ],
      feedbackTypeData: [
        { label: '统一反馈', value: 0 },
        { label: '按会员反馈', value: 1 }
      ],
      phoneType: [
        { label: '企业电话拨号', value: 0 },
        { label: '导购私人电话拨号', value: 1 }
      ],
      creator: '',
      ban: false,
      taskInfo: [],
      fileList: [],
      affixFileList: [],
      onceVisible: false,
      circulationVisible: false,
      strikeVisible: false,
      callVisible: false,
      wechatVisible: false,
      marketingVisible: false, //营销短信
      aiIphoneVisible: false, //ai拨号
      messIdVisible: false, //消息模板
      onSaleVisible: false, //优惠券发放
      officialAccountsVisible: false, //公众号推文
      outlineVisible: false, //自定义任务
      guideTypeVisible: true, //执行导购
      appointGuideVisible: false,
      appointshopGuideVisible: false,
      appointvipGuideVisible: false,
      daysVisible: false,
      weeksVisible: false,
      monthsVisible: false,
      programVisible: false,
      textVisible: false,
      guideExcel: false, //指定导购excel上传按钮
      shopExcel: false, //指定门店excel上传按钮
      notAutoTaskVisible: false, //门店任务导购任务
      autoTaskVisible: false, //自动任务
      targetVipVisible: false, //目标会员
      ifAuto: false, //判断是否为自动任务 true则显示反馈方式，false则隐藏
      rangeVisible: false, //选择企业微信朋友圈后的可见范围选择下拉框
      uploadBox: false, //是否显示上传文件
      vipList: [],
      isDisabled: false,
      monidata: ['11', '22', '33', '44'],
      videoTime: '',
      peopleType: 1,
      ticketIdList: [],
      templateIdList: [],
      graphicList: [],
      custList: [],
      excelData: '',
      enclosure: {},
      addTaskForm: {
        expireType: 1,
        taskObject: 1,
        custConnectType: [],
        wechatType: '',
        feedbackType: '',
        guideType: '',
        visibleType: '',
        taskType: '',
        expireTime: '',
        endProcess: '',
        endProcessDay: '',
        taskAlias: '',

        custPack: ''
      },
      // 3期
      noCarry: false,
      boxTask: true,
      boxTaskTypeData: [
        { label: 'box搭盒', value: 10 },
        { label: 'box引导购买', value: 11 },
        { label: 'box商品入库', value: 12 }
      ],
      storeBoxTask: [{ label: '内淘发货', value: 13 }]
    }
  },
  created() {
    console.log(this.addTaskForm.taskObject)
    console.log(JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.realname)
    this.creator = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.realname
    this.fileList = []
    this.getScene()
  },
  methods: {
    downloadStoreTemplate() {
      window.open('/taskpublic/指定门店导入模板.xlsx', '_blank')
    },
    // 点击模板按钮触发a下载文件
    downloadGuideTemplate() {
      window.open('/taskpublic/指定导购导入模板.xlsx', '_blank')
    },
    changeNumber(val) {
      console.log(val)
      this.addTaskForm.expireTime = Number(val)
    },
    // 电话类型
    changephoneType(val) {
      console.log('phoneType    ', val)
    },
    onChange(checkedValues) {
      console.log('checked = ', checkedValues)
      console.log('value = ', JSON.stringify(this.addTaskForm.custConnectType))
      if (checkedValues.includes(1) === true) {
        this.phoneVisble = true
      } else {
        this.phoneVisble = false
      }
      console.log('value = ', JSON.stringify(this.addTaskForm.custConnectType))
    },
    // 传递材料信息
    getUploadData(value) {
      this.enclosure = value
      console.log('uploadDatas after   ', value)
    },
    goback() {
      this.$router.back()
    },
    onChooseVip(value) {
      this.peopleType = value
    },
    // 传递excel(导购)
    chooseGuideExcel(list) {
      console.log(list)
      this.excelData = list
      console.log('choose', this.excelData)
      // console.log("choose", JSON.stringify(this.excelData));
    },
    // 传递excel(门店)
    choosexcelData(list) {
      this.excelData = list
      console.log('choose', this.excelData)
    },
    // 传递优惠券
    chooseTicketList(list) {
      this.ticketIdList = list
      console.log('choose', list)
    },
    // 传递文章
    choosegraphicList(list) {
      this.graphicList = list
      console.log('choose', list)
    },
    // 传递模板
    chooseTemplateId(list) {
      this.templateIdList = list
      console.log('choose', list)
    },
    // 传递人群包
    chooseCustList(list) {
      this.custList = list
      console.log('choose', list)
    },
    // 传递营销短信
    // 传递Ai电话
    changeWechat(e) {
      console.log(e)
    },
    selectScene(val, opt) {
      console.log(val, opt)
      this.addTaskForm.taskSceneId = val
      this.addTaskForm.taskGroupId = opt.taskGroupId
    },

    changeTaskObject(val) {
      console.log('任务类型', val)
      this.ifAuto = false
      if (this.addTaskForm.taskObject === 3) {
        this.appointvipGuideVisible = true
        this.vipList = []
        this.addTaskForm.custPack = undefined
        this.autoTaskVisible = true
        // this.targetVipVisible = true
        this.notAutoTaskVisible = false
        this.addTaskForm.taskType = null
        this.addTaskForm.custConnectType = [] //清除联系触达内容
        this.addTaskForm.wechatType = '' //清除微信转发内容
        this.callVisible = false //隐藏联系触达
        this.wechatVisible = false //隐藏微信转发
        this.messIdVisible = false
        this.onSaleVisible = false
        this.officialAccountsVisible = false
        this.marketingVisible = false
        this.aiIphoneVisible = false
        this.guideTypeVisible = false
        this.addTaskForm.guideType = null
        this.appointGuideVisible = false
        this.appointshopGuideVisible = false
        // this.appointvipGuideVisible = false
      }
      // else if(this.addTaskForm.taskObject === 2){

      // }
      else {
        this.vipList = [] //人群包清空
        this.appointvipGuideVisible = false
        this.addTaskForm.custPack = '' //人群包清空
        this.guideTypeVisible = true
        this.autoTaskVisible = false
        // this.targetVipVisible = false
        this.notAutoTaskVisible = true
        this.addTaskForm.taskType = null
        this.addTaskForm.messageId = '' //清除消息模板内容
        this.messIdVisible = false //消息模板ID隐藏
        this.addTaskForm.ticketId = '' //清除优惠券发放内容
        this.onSaleVisible = false //优惠券发放ID隐藏
        this.addTaskForm.articleId = '' //清除公众号推文内容
        this.officialAccountsVisible = false //公众号推文ID隐藏
        ;(this.marketingVisible = false), (this.aiIphoneVisible = false), (this.callVisible = false) //隐藏联系触达
        this.wechatVisible = false //隐藏微信转发
        this.addTaskForm.guideType = null
      }
    },
    wechatTypeDataClick() {
      console.log(this.addTaskForm.wechatType)
      if (this.addTaskForm.wechatType === 1) {
        this.isDisabled = true //执行导购选择框不可用
        this.addTaskForm.guideType = 3 //执行导购默认选择指定会员
        this.appointvipGuideVisible = true //人群包输入框显示
        this.appointGuideVisible = false //指定导购选择范围框隐藏
        this.appointshopGuideVisible = false //指定门店选择范围框隐藏
        this.rangeVisible = false //朋友圈可见范围下拉选择框隐藏
        this.addTaskForm.visibleType = null
      } else if (this.addTaskForm.wechatType === 2) {
        this.isDisabled = false //执行导购选择框可用
        this.rangeVisible = false //朋友圈可见范围下拉选择框隐藏
        this.uploadForm.mediaType = null
        this.programVisible = false
        this.addTaskForm.visibleType = 1
      } else if (this.addTaskForm.wechatType === 3) {
        this.isDisabled = false //执行导购选择框可用
        this.rangeVisible = false //朋友圈可见范围下拉选择框隐藏
        this.addTaskForm.visibleType = null
      }
    },
    // 获取场景
    getScene() {
      let data = {}

      getOpenScene(data, res => {
        console.log(res)
        this.sceneOptions = res.data
      })
    },
    //新增任务
    addBtn(val) {
      console.log('addBtn    before   ', this.addTaskForm.taskSceneId)
      if (!this.addTaskForm.taskSceneId) {
        this.$message.error('请选择场景!')
        return
      }
      if (!this.addTaskForm.taskObject) {
        this.$message.error('请选择任务级别!')
        return
      }
      if (!this.addTaskForm.taskTitle) {
        this.$message.error('请选择任务名称!')
        return
      }
      if (!this.addTaskForm.taskDescription) {
        this.$message.error('请填写任务描述!')
        return
      }
      if (!this.addTaskForm.taskType) {
        this.$message.error('请选择任务类型!')
        return
      }
      if (!this.addTaskForm.expireTime) {
        this.$message.error('请选择有效期!')
        return
      }
      if (!this.addTaskForm.endProcess) {
        this.$message.error('请选择到期是否执行!')
        return
      }
      if (this.addTaskForm.endProcess == 1 && !this.addTaskForm.endProcessDay) {
        console.log(this.addTaskForm.endProcessDay);
        this.$message.error('请输入到期可执行天数!')
        return
      }
      console.log('addBtn    start   ')

      let taskDefineId
      let data = {
        taskGroupId: this.addTaskForm.taskGroupId, //分组id
        taskSceneId: this.addTaskForm.taskSceneId, //场景id
        taskObject: Number(this.addTaskForm.taskObject), //任务级别
        taskTitle: this.addTaskForm.taskTitle, //任务名称
        taskAlias: this.addTaskForm.taskAlias, //任务别名
        taskDescription: this.addTaskForm.taskDescription, //任务说明
        execType: Number(this.addTaskForm.execType), //执行时效 value
        endProcess: Number(this.addTaskForm.endProcess), //到期是否执行
        endProcessDay: Number(this.addTaskForm.endProcessDay), //到期执行天数
        taskType: Number(this.addTaskForm.taskType), //任务类型
        creator: this.creator, //创建人
        // feedbackType:Number(this.addTaskForm.feedbackType), //反馈方式
        // guideType:Number(this.addTaskForm.guideType),
        publishStatus: val,
        peopleType: this.peopleType //选择人群包
      }
      if (this.addTaskForm.dealerType === 1) {
        if (this.excelData.length === 0) {
          this.$message.error('请上传Excel文件!')
          return
        }
        // 上传员工ID表
        data.dealerIds = this.excelData
      }
      if (this.addTaskForm.storeType === 1) {
        if (!this.excelData.length === 0) {
          this.$message.error('请上传Excel文件!')
          return
        }
        // 上传门店表
        data.storeCodes = this.excelData
      }
      if (this.addTaskForm.execType === 2) {
        data.effectDate = this.addTaskForm.effectDate //生效时间
        data.expireTime = Number(this.addTaskForm.expireTime) //有效期
        data.expireType = Number(this.addTaskForm.expireType) //有效期单位（小时/天）
        data.publishDate = this.addTaskForm.publishDate //发布时间
      } else if (this.addTaskForm.execType === 1) {
        if (this.addTaskForm.cycleType === 1) {
          data.cycleType = Number(this.addTaskForm.cycleType)
          data.execTime = this.addTaskForm.execTime
          data.effectDate = this.addTaskForm.effectDate
          data.expireTime = Number(this.addTaskForm.expireTime) //有效期
          data.expireType = Number(this.addTaskForm.expireType) //有效期单位（小时/天）
        } else if (this.addTaskForm.cycleType === 2) {
          data.cycleType = Number(this.addTaskForm.cycleType)
          data.execWeek = parseInt(this.addTaskForm.execWeek)
          data.execTime = this.addTaskForm.execTime
          data.expireTime = Number(this.addTaskForm.expireTime)
          data.expireType = Number(this.addTaskForm.expireType)
        } else if (this.addTaskForm.cycleType === 3) {
          data.cycleType = Number(this.addTaskForm.cycleType)
          data.execDay = parseInt(this.addTaskForm.execDay)
          data.execTime = this.addTaskForm.execTime
          data.expireTime = Number(this.addTaskForm.expireTime)
          data.expireType = Number(this.addTaskForm.expireType)
        } else if (this.addTaskForm.cycleType === 4) {
          data.cycleType = Number(this.addTaskForm.cycleType)
        }
      } else if (this.addTaskForm.execType === 3) {
        data.expireTime = Number(this.addTaskForm.expireTime) //有效期
      }

      if (this.addTaskForm.taskType === 1) {
        //联系触达
        // data.custConnectType = this.addTaskForm.custConnectType
        if (this.addTaskForm.custConnectType) {
          if (this.addTaskForm.custConnectType.length == 0) {
            this.$message.error('请选择联系触达方式')
            this.spinning = false
            return
          }
          data.custConnectType = JSON.stringify(this.addTaskForm.custConnectType)
        } else {
          this.$message.error('请选择联系触达方式')
          this.spinning = false
          return
        }
      } else if (this.addTaskForm.taskType === 2) {
        //微信转发
        if (this.addTaskForm.wechatType === 2) {
          data.wechatType = this.addTaskForm.wechatType
          if (!this.addTaskForm.visibleType) {
            this.addTaskForm.visibleType = 1
            data.visibleType = this.addTaskForm.visibleType
          } else {
            data.visibleType = this.addTaskForm.visibleType //企业微信朋友圈的可见范围
          }
        } else {
          data.wechatType = this.addTaskForm.wechatType
          // data.wechatType = JSON.stringify(this.addTaskForm.wechatType)
        }
      } else if (this.addTaskForm.taskType === 3) {
        //消息模板
        if (this.templateIdList.length === 0) {
          this.$message.error('请选择消息模板')
          return
        }
        data.messageId = JSON.stringify(this.templateIdList)
      } else if (this.addTaskForm.taskType === 4) {
        if (this.ticketIdList.length === 0) {
          this.$message.error('请选择优惠券')
          return
        }

        //优惠券发放
        data.ticketId = JSON.stringify(this.ticketIdList)
      } else if (this.addTaskForm.taskType === 5) {
        //公众号推文
        if (this.graphicList.length === 0) {
          this.$message.error('请选择公众号推文')
          return
        }
        data.articleId = JSON.stringify(this.graphicList)
      } else if (this.addTaskForm.taskType === 6) {
        data.feedbackType = Number(this.addTaskForm.feedbackType) //反馈方式
      }
      if (this.addTaskForm.guideType === 1) {
        data.guideType = Number(this.addTaskForm.guideType)
        data.dealerType = Number(this.addTaskForm.dealerType)
      } else if (this.addTaskForm.guideType === 2) {
        data.guideType = Number(this.addTaskForm.guideType)
        data.storeType = Number(this.addTaskForm.storeType)
      } else if (this.addTaskForm.guideType === 3) {
        data.guideType = Number(this.addTaskForm.guideType)
        if (this.custList.length === 0) {
          this.$message.error('请填写人群包')
          this.spinning = false
          return
        }
        data.custPack = JSON.stringify(this.custList)
      }
      if (this.addTaskForm.taskObject === 3) {
        if (this.custList.length === 0) {
          this.$message.error('请填写人群包')
          this.spinning = false
          return
        }
        data.custPack = JSON.stringify(this.custList)
      }
      if (!this.addTaskForm.expireType) {
        data.expireType = 1
      }

      console.log('addBtn    doing  ')
      console.log('data   ', data)
      addTask(data, res => {
        console.log(res)
        console.log('data   ', data)
        let vm = this
        taskDefineId = res.data
        console.log('taskDefineId   ' + taskDefineId)
        let code = res.code
        if (code === 200) {
          let data = {
            taskDefineId: taskDefineId,
            mediaType: this.enclosure.mediaType,
            mediaContent: this.enclosure.mediaContent,
            mediaType: this.enclosure.mediaType,
            urlPic: this.enclosure.urlPic, //链接封面，小程序封面
            // url: imgList[0],//视频链接，网页链接
            urlTitle: this.enclosure.urlTitle, //链接标题，小程序标题
            url: this.enclosure.url //图片链接
          }
          console.log('miediaData', data)
          //添加附件
          uploadTaskMedia(data, res => {
            console.log(res)
            // this.$message.success("添加成功");
            // this.$router.push("/task/release");
            // this.$router.back();
            // this.$router.push({ name:'media',query:{id:taskDefineId}})
          })
          this.$message.success('保存成功')
          this.$router.push('/task/release')
          // }
        } else if (code === 500) {
          this.spinning = false
          this.$message.error('请完善填写内容')
        } else {
          console.log('addBtn    fail  ')
          this.$message.error(res.msg)
        }
      })
    },
    // 选择执行时效
    changeexecType(val) {
      console.log(val, '执行时效')
      // this.addTaskForm.expireType=undefined
      this.addTaskForm.endProcess = ''
      this.addTaskForm.endProcessDay = ''
      let execType = val
      this.cleanExecType()

      if (execType === 2) {
        this.onceVisible = true
        this.cleanTrigger()
      } else if (execType === 1) {
        this.circulationVisible = true
        this.cleanTrigger()
      } else if (execType === 3) {
        console.log('实时触发')
        this.strikeVisible = true
        this.addTaskForm.taskAlias = ''
        this.ban = true
        this.boxTask = false
        this.addTaskForm.expireTime = 24
        this.addTaskForm.endProcess = 1
      }
    },
    //清空实时触发联动
    cleanTrigger() {
      // this.addTaskForm.expireTime=''
      this.addTaskForm.taskType = ''
      this.noCarry = false
      this.ban = false
      this.boxTask = true
      // this.addTaskForm.taskObject=''
      // this.addTaskForm.taskAlias=''
      // this.addTaskForm.taskDescription=''
      // this.addTaskForm.taskTitle=''
    },
    cleanExecType() {
      this.onceVisible = false
      this.circulationVisible = false
      this.strikeVisible = false
    },
    // 选择任务类型
    changetaskType(val) {
      console.log('changetaskType ', val)
      this.phoneVisble = false
      this.addTaskForm.custConnectType = []
      this.addTaskForm.wechatType = ''
      this.rangeVisible = false
      this.addTaskForm.messageId = ''
      this.addTaskForm.ticketId = ''
      this.addTaskForm.articleId = ''
      // this.addTaskForm.expireTime=''
      let taskType = val
      this.cleantaskType()
      if (taskType === 1) {
        this.callVisible = true
        this.isDisabled = true //执行导购选择框不可用
        this.addTaskForm.guideType = 3 //执行导购默认选择指定会员
        this.appointvipGuideVisible = true //人群包输入框显示
        this.appointGuideVisible = false //指定导购选择范围框隐藏
        this.appointshopGuideVisible = false //指定门店选择范围框隐藏
        this.addTaskForm.feedbackType = null
        // \\\\
      } else if (taskType === 2) {
        this.wechatVisible = true
        this.isDisabled = false
        this.addTaskForm.feedbackType = null
      } else if (taskType === 3) {
        this.messIdVisible = true
        this.isDisabled = false
        this.addTaskForm.feedbackType = null
      } else if (taskType === 4) {
        this.onSaleVisible = true
        this.isDisabled = false
        this.addTaskForm.feedbackType = null
      } else if (taskType === 5) {
        this.officialAccountsVisible = true
        this.isDisabled = false
        // this.addTaskForm.feedbackType = null;
      } else if (taskType === 6) {
        this.outlineVisible = true
        this.isDisabled = false
        // this.addTaskForm.feedbackType = undefined;
        // this.appointvipGuideVisible = false
        // this.ifAuto = true
      } else if (taskType === 8) {
        //营销短信
        this.marketingVisible = true
        this.isDisabled = false
        this.addTaskForm.feedbackType = null
        // this.appointvipGuideVisible = false
        // this.ifAuto = true
      } else if (taskType === 9) {
        //智能电话
        this.aiIphoneVisible = true
        this.isDisabled = false
        this.addTaskForm.feedbackType = null
      } else if (taskType === 7) {
        //添加微信
        this.isDisabled = true //执行导购选择框不可用
        this.addTaskForm.guideType = 3 //执行导购默认选择指定会员
        this.appointvipGuideVisible = true //人群包输入框显示
        this.appointGuideVisible = false //指定导购选择范围框隐藏
        this.appointshopGuideVisible = false //指定门店选择范围框隐藏
        this.addTaskForm.feedbackType = null
      } else if (taskType === 10) {
        //box搭盒
        this.addTaskForm.expireTime = 24
        this.addTaskForm.endProcess = 1
        this.noCarry = true
        this.addTaskForm.taskDescription = '您有新的会员主动要盒，请及时处理！'
        this.addTaskForm.taskTitle = 'BOX搭盒任务'
      } else if (taskType === 11) {
        //box引导购买
        this.addTaskForm.expireTime = 24
        this.addTaskForm.endProcess = 1
        this.noCarry = true
        this.addTaskForm.taskDescription = '商品已被签收，请引导会员购买商品！'
        this.addTaskForm.taskTitle = 'BOX引导购买'
      } else if (taskType === 12) {
        //box商品入库
        this.addTaskForm.expireTime = 72
        this.addTaskForm.endProcess = 1
        this.noCarry = true
        this.addTaskForm.taskDescription = '商品已被寄回，请及时入库！！'
        this.addTaskForm.taskTitle = 'BOX商品入库'
      } else if (taskType === 13) {
        //内淘发货   门店
        this.addTaskForm.expireTime = 8
        this.addTaskForm.endProcess = 1
        this.noCarry = true
        this.addTaskForm.taskDescription = '门店有新的待发货内淘单，请及时处理！'
        this.addTaskForm.taskTitle = '内淘发货任务'
      }
      if (taskType === 6) {
        this.ifAuto = true
      } else {
        this.ifAuto = false
      }
    },
    cleantaskType() {
      this.callVisible = false
      this.wechatVisible = false
      this.outlineVisible = false
      this.messIdVisible = false
      this.onSaleVisible = false
      this.officialAccountsVisible = false
      this.marketingVisible = false
      this.aiIphoneVisible = false
    },
    //朋友圈可见选择下拉框
    changeRange(val) {
      console.log(val)
      if (val === 1) {
        this.isDisabled = false //执行导购选择框可用
      } else if (val === 2) {
        this.isDisabled = true //执行导购选择框不可用
        this.addTaskForm.guideType = 3 //执行导购默认选择指定会员
        this.appointvipGuideVisible = true //人群包输入框显示
        this.appointGuideVisible = false //指定导购选择范围框隐藏
        this.appointshopGuideVisible = false //指定门店选择范围框隐藏
      }
    },
    //选择反馈方式
    changeFeedBack(val) {
      console.log(val)
      // this.addTaskForm.feedbackType=undefined
      if (val === 0) {
        console.log(1)
        this.isDisabled = false //执行导购选择框可用
      } else if (val === 1) {
        this.isDisabled = true //执行导购选择框可用
        this.addTaskForm.guideType = 3 //执行导购默认选择指定会员
        this.appointvipGuideVisible = true //人群包输入框显示
        this.appointGuideVisible = false //指定导购选择范围框隐藏
        this.appointshopGuideVisible = false //指定门店选择范围框隐藏
      }
    },

    //选择执行导购
    changeGuide(val) {
      this.cleanGuide()
      if (val === 1) {
        //选择指定导购
        this.appointGuideVisible = true
        this.addTaskForm.storeType = null //清空门店选择范围
        this.shopExcel = false //门店excel上传按钮隐藏
        this.addTaskForm.custPack = '' //清空人群包ID输入框内容
        // this.vipList.length = 0; //清空额外添加人群包ID
      } else if (val === 2) {
        //选择指定门店
        this.appointshopGuideVisible = true
        this.addTaskForm.dealerType = null //清空导购选择范围
        this.guideExcel = false //指定导购excel上传按钮隐藏
        this.addTaskForm.custPack = '' //清空人群包ID输入框内容
        // this.vipList.length = 0; //清空额外添加人群包ID
      } else if (val === 3) {
        //选择指定会员
        this.appointvipGuideVisible = true
        this.addTaskForm.dealerType = null //清空导购选择范围
        this.guideExcel = false //指定导购excel上传按钮隐藏
        this.addTaskForm.storeType = null //清空门店选择范围
        this.shopExcel = false //门店excel上传按钮隐藏
      }
    },
    cleanGuide() {
      this.appointGuideVisible = false
      this.appointshopGuideVisible = false
      this.appointvipGuideVisible = false
    },
    scopeGuide(val) {
      console.log(val)
      if (val === 0) {
        this.guideExcel = false
      } else if (val === 1) {
        this.guideExcel = true
      }
    },
    scopeShop(val) {
      if (val === 0) {
        this.shopExcel = false
      } else if (val === 1) {
        this.shopExcel = true
      }
    },
    //选择执行周期
    changecycleType(val) {
      console.log(val, '执行周期')
      this.addTaskForm.taskType = undefined
      this.messIdVisible = false
      this.cleancycleType()
      this.hoursVisible = false
      if (val === 1) {
        this.daysVisible = true
      } else if (val === 2) {
        this.weeksVisible = true
      } else if (val === 3) {
        this.monthsVisible = true
      } else if (val === 4) {
        this.hoursVisible = true
      }
    },
    cleancycleType() {
      this.daysVisible = false
      this.weeksVisible = false
      this.monthsVisible = false
    },
    async handleUpload(id, file, url) {
      console.log(file)
      console.log(id)
      console.log(url)
      let formData = new FormData()
      let config = {
        headers: { 'Content-Type': 'multipart/form-data' }
      }
      formData.append('file', file)
      formData.append('taskDefineId', id)
      // importStoreExcel
      let data = await axios.post(api.uploadExecl + url, formData, config).then(res => {
        return res
      })
      console.log(data)
      this.spinning = false
    },

    openFile(file) {
      console.log(file)
    },
    //视频的上传事件
    isVideoTime(data, time) {
      return new Promise((resolve, reject) => {
        let url = URL.createObjectURL(data.file.originFileObj)
        console.log(url)
        let audioElement = new Audio(url)
        audioElement.addEventListener('loadedmetadata', function () {
          console.log(audioElement.duration)
          this.videoTime = audioElement.duration
          console.log(this.videoTime)
          if (this.videoTime < time) {
            resolve(true)
          } else {
            resolve(false)
          }
        })
      })
    },
    // 上传视频
    videoBeforeUpload(file) {
      this.affixFileList = []
      console.log(file)
      return new Promise((resolve, reject) => {
        const isJpgOrPng = file.type === 'video/mp4'
        const isLt10M = file.size / 1024 / 1024 < 10
        if (!isJpgOrPng) {
          this.$message.error('只能上传mp4格式的视频!')
          // this.affixFileList = []
          return isJpgOrPng
          // return reject(false)
        } else if (!isLt10M) {
          // this.affixFileList = []
          this.$message.error('视频大小不能超过10M!')
          return isLt10M
          // return reject(false)
        } else {
          return resolve(true)
        }
      })
    },
    changeendProcess(e) {
      this.addTaskForm.endProcessDay = ''
    }
  }
}
</script>

<style scoped lang="less">
.titleMess {
  font-size: 18px;
}
.ant-divider {
  margin: 15px 0;
}
.ant-form {
  .ant-select {
    width: 170px;
    margin-right: 10px;
  }
  .ant-input {
    width: 200px;
  }
  .ant-upload-list {
    width: 200px;
  }
}
.addBtn {
  margin-top: 20px;
}
.tishi {
  margin-left: 5px;
  font-size: 12px;
  color: #7f7f7f;
}
.add_btn,
.del_btn {
  padding: 0 10px;
  cursor: pointer;
  margin-left: 10px;
}
.getId {
  font-size: 12px;
  margin-left: 10px;
}
.ant-form-item {
  display: flex;
}
.ml {
  margin-left: 15px;
}
</style>
